import userEvent from '@testing-library/user-event'
import React,{useEffect,useState} from 'react'
import { Button, Space, Swiper, Toast } from 'antd-mobile'
import styles from './index.css'

export default function Index() {
  const [colors, setColor] = useState([])
  useEffect(()=>{
    setColor(
      ['#ace0ff', '#bcffbd', '#e4fabd', '#ffcfac']
    )
    new Swiper('.swiper-container', {
      slidesPerView: 3,
      centeredSlides: true,
      virtual: {
          slides:this.state.newlist,
      }
  })
  },[])
  useEffect(()=>{
  //   if (navigator.geolocation) {
  //     // var n = navigator.geolocation.getCurrentPosition(function(res){
  //     //     console.log(res); // 需要的坐标地址就在res中
  //     // });
  //     console.log("zhichi")
  //  } else {
  //      alert('该浏览器不支持定位');
  //  }
  },[])
  return (
    <div>
      <div className='new'>
                <div className="swiper-container">
                    <div className="swiper-wrapper">
                    </div>
                </div>
            </div>    
    </div>
  )
}
